class BaseSearchFictionData {
  BaseDataSearchFictionData data;
  int code;
  String msg;

  BaseSearchFictionData({this.data, this.code, this.msg});

  factory BaseSearchFictionData.fromJson(Map<String, dynamic> json) {
    return BaseSearchFictionData(
      data: json['data'] != null ? BaseDataSearchFictionData.fromJson(json['data']) : null,
      code: json['code'],
      msg: json['msg'],
    );
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['code'] = this.code;
    data['msg'] = this.msg;
    if (this.data != null) {
      data['data'] = this.data.toJson();
    }
    return data;
  }
}

class BaseDataSearchFictionData {
  List<SearchFictionData> data;
  ///总数
  int count;
  ///第[from]页
  int from;
  ///该页数量
  int size;

  BaseDataSearchFictionData({this.data, this.count, this.from, this.size});

  factory BaseDataSearchFictionData.fromJson(Map<String, dynamic> json) {
    return BaseDataSearchFictionData(
      data: json['data'] != null ? (json['data'] as List).map((i) => SearchFictionData.fromJson(i)).toList() : null,
      count: json['count'],
      from: json['from'],
      size: json['size'],
    );
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['count'] = this.count;
    data['from'] = this.from;
    data['size'] = this.size;
    if (this.data != null) {
      data['data'] = this.data.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class SearchFictionData {
  int id;
  ///作者
  String author;
  ///封面
  String cover;
  ///创建时间
  String creationTime;
  ///简介
  String descs;
  ///id
  String fictionId;
  ///类型
  String fictionType;
  int fictionVariableId;
  ///标题
  String title;
  ///更新时间
  String updateTime;

  SearchFictionData({this.author, this.cover, this.creationTime, this.descs, this.fictionId, this.fictionType, this.fictionVariableId, this.id, this.title, this.updateTime});

  factory SearchFictionData.fromJson(Map<String, dynamic> json) {
    return SearchFictionData(
      author: json['author'],
      cover: json['cover'],
      creationTime: json['creationTime'],
      descs: json['descs'],
      fictionId: json['fictionId'],
      fictionType: json['fictionType'],
      fictionVariableId: json['fictionVariableId'],
      id: json['id'],
      title: json['title'],
      updateTime: json['updateTime'],
    );
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['author'] = this.author;
    data['cover'] = this.cover;
    data['creationTime'] = this.creationTime;
    data['descs'] = this.descs;
    data['fictionId'] = this.fictionId;
    data['fictionType'] = this.fictionType;
    data['fictionVariableId'] = this.fictionVariableId;
    data['id'] = this.id;
    data['title'] = this.title;
    data['updateTime'] = this.updateTime;
    return data;
  }
}